import request from "@/utils/request";
import type {ICommonResponse} from "@/types/global";

export interface ILoginAPIRequestData {
    loginName: string,
    passwordMd5: string,
}

const loginAPI = (data: ILoginAPIRequestData): ICommonResponse<string> => {
    return request({
        url: '/api/v1/user/login',
        method: "POST",
        data,
    })
}

export default loginAPI;